<html
    xmlns="http://www.w3.org/1999/xhtml"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:p="http://primefaces.org/ui">

    <ui:composition template="layout.xhtml">
        
        <ui:define name="title">
           Detalhes do Emolumento
           </ui:define>

        <ui:define name="content">
            <div class="actions">
                <div id="buttons">
                    <p:button value="Editar" outcome="criarEmolumento.xhtml"
                                  icon="ui-icon-pencil"
                                  styleClass="ui-priority-primary">
                            <f:param value="#{ managerPesquisarEmolumento.emolumentoVisualizar.id }" name="emolumentoId"/>
                        </p:button>

                        <p:button value="Pesquisar" outcome="pesquisarEmolumento.xhtml" icon="ui-icon-search"
                                  styleClass="ui-priority-primary botao_pesquisar" >
                        </p:button>

                        <p:button value="Excluir" outcome="pesquisarEmolumento.xhtml" icon="ui-icon-trash"
                                  styleClass="botao_deletar" >
                            </p:button>
                    
                </div>
                </div>

                <p:fieldset legend="Dados" id="dadosFieldset">
                <div class="row">
                    <div class="column2 bold">
                        <p:outputLabel value="Descrição:" />
                    </div>
                    <div class="column10 text">
                        <p:outputLabel value="#{ managerPesquisarEmolumento.emolumentoVisualizar.descricao }"/>
                    </div>
                </div>
                <div class="row">
                    <div class="column2 bold">
                        <p:outputLabel value="Data de Vigor:" />
                    </div>
                    <div class="column3 text">
                        <p:outputLabel value="#{ managerPesquisarEmolumento.emolumentoVisualizar.dataVigor }">
                            <f:convertDateTime pattern="dd/MM/yyyy" />
                        </p:outputLabel>
                    </div>

                    <div class="column2 bold">
                        <p:outputLabel value="Valor do Selo:" />
                    </div>
                    <div class="column3 text">
                        <p:outputLabel value="#{ managerPesquisarEmolumento.emolumentoVisualizar.valorSelo }">
                            <f:convertNumber type="currency" locale="pt-BR" />
                        </p:outputLabel>
                    </div>
                </div>

<!--                <div class="clear"></div>-->
                </p:fieldset>
                <p:dataTable id="itensDataTable" var="item" value="#{ managerCriarEmolumento.emolumentoItens }"
                        rows="5" paginator="true" paginatorPosition="bottom">
                    <f:facet name="header">Itens do Emolumento</f:facet>

                    <p:column headerText="Ato" width="65%">
                        <h:outputText value="#{ item.atoItem.codigo } - #{ item.atoItem.descricao }" />
                    </p:column>
                    <p:column headerText="Valor do Cartório" width="10%">
                        <h:outputText value="#{ item.valorCartorio }">
                            <f:convertNumber type="currency" locale="pt-BR" />
                        </h:outputText>
                    </p:column>
                    <p:column headerText="Valor do FERMOJUPI" width="10%">
                        <h:outputText value="#{ item.valorFermojupi }">
                            <f:convertNumber type="currency" locale="pt-BR" />
                        </h:outputText>
                    </p:column>
                    <p:column headerText="Valor total" width="10%">
                        <h:outputText value="#{ item.valorTotal }">
                            <f:convertNumber type="currency" locale="pt-BR" />
                        </h:outputText>
                    </p:column>
                    <p:column headerText="OAB" width="5%">
                        <h:outputText value="#{ item.oab == true ? 'Sim' : 'Não'  }" />
                    </p:column>                    
                </p:dataTable>
                        
            

<!--            <div class="command">
                <p:button value="Voltar" icon="ui-icon-arrowreturn-1-w" href="pesquisarEmolumento.xhtml" />
            </div>            -->

        </ui:define>
    </ui:composition>
    
</html>